﻿using System;
using System.Web.Security;
using uForum.Businesslogic.Services;

namespace uForum.Providers
{
	public class UmbracoMemberIdConverter : IMemberIdConverter
	{

		public bool CanHandle(MembershipProvider provider)
		{
			return provider.GetType().FullName.Equals("umbraco.providers.members.UmbracoMembershipProvider");
		}

		public object ConvertToProviderKey(string id)
		{
			return Convert.ToInt32(id);
		}

		public string ConvertToString(object providerKey)
		{
			return providerKey.ToString();
		}
	}
}
